import pytest
from unittest.mock import Mock, patch
from dotenv import load_dotenv

# 加载测试环境变量
load_dotenv('.env.test')

@pytest.fixture
def mock_arxiv():
    """模拟arxiv API"""
    with patch('arxiv.Client') as mock:
        yield mock

@pytest.fixture
def mock_openai():
    """模拟OpenAI API"""
    with patch('openai.Client') as mock:
        yield mock

@pytest.fixture
def mock_chroma():
    """模拟ChromaDB"""
    with patch('chromadb.Client') as mock:
        yield mock